Skip to content

fix: Duplicate calls syncing Calendar integrations#26858

Merged
emrysal merged 5 commits intomainfrom
bugfix/remove-duplicate-calls-to-connectedCalendars
Jan 15, 2026
Merged

fix: Duplicate calls syncing Calendar integrations#26858
emrysal merged 5 commits intomainfrom
bugfix/remove-duplicate-calls-to-connectedCalendars

Conversation

@emrysal
Copy link
Contributor

@emrysal emrysal commented Jan 15, 2026

Summary by cubic

Fixes duplicate calendar sync calls by scoping and reusing data in calendar settings. Reduces unnecessary API requests and speeds up onboarding and settings pages.

  • Bug Fixes
    • Pass connectedCalendars to DestinationCalendarSettingsWebWrapper and SelectedCalendarsSettingsWebWrapper, using initialData to avoid extra queries.
    • Scope queries to eventType only when needed; reuse user-level data otherwise.
    • Simplify selected calendar retrieval with direct filtering; remove unused repository helper.
    • Clean up conditional rendering in CalendarListContainer to prevent repeated fetches.
    • Align schema typing (nullish eventTypeId) and handler return types; minor map/flatMap and typing tweaks.

Written for commit 94a67e2. Summary will update on new commits.

};
}

static getSelectedCalendarsFromUser<TSelectedCalendar extends { eventTypeId: number | null }>({
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not related to the issue being fixed, but a big anti-pattern and risk-free.

@emrysal emrysal marked this pull request as ready for review January 15, 2026 02:10
@emrysal emrysal requested a review from a team as a code owner January 15, 2026 02:10
@graphite-app graphite-app bot added core area: core, team members only foundation labels Jan 15, 2026
@emrysal emrysal enabled auto-merge (squash) January 15, 2026 02:10
@github-actions
Copy link
Contributor

E2E results are ready!

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 8 files

Copy link
Contributor

@pedroccastro pedroccastro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good optimization! 👍

@emrysal emrysal merged commit 1dd2652 into main Jan 15, 2026
80 of 82 checks passed
@emrysal emrysal deleted the bugfix/remove-duplicate-calls-to-connectedCalendars branch January 15, 2026 03:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments